package cn.com.yw.config;

import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class HelloSchedule {

    @Async
//    @Scheduled(cron = "* * * * * ?")
    public void hello(){
        System.out.println("hello....");
        try {
            Thread.sleep(3000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
